home *** CD-ROM | disk | FTP | other *** search
- ! module for True BASIC image processing toolkit
- ! routines for True BASIC for the Silicon Graphics Graphics Library
- ! note: images here use the origin in the upper left corner
- module IFFgl
-
- ! load image in file a$ and return the size in xmax,ymax
- ! cmax is the largest color index contained in the image
- sub IFFload(a$,xmax,ymax,cmax)
- call diagnostics(1)
- call tw_wset_size(0,420,308)
- set mode "rgb"
- ask pixels px,py
- set window 0,px-1,0,py-1
- call readimage("eye.rgb",0,0,xmax,ymax,cmax)
-
- ! move image to upper right corner
- box keep 0,xmax,0,ymax in temp$
- clear
- box show temp$ at 0,py-ymax
- set window 0,px,py,0
- get point x,y
- let temp$=""
- end sub
- sub PicBuf(x1,x2,y1,y2,buffer$())
- mat redim buffer$(0:y1-y2)
- for i=y2 to y1
- let st=1
- for j=x1 to x2
- call packb(buffer$(i),st,8,readpixel(j,i))
- let st=st+8
- next j
- next i
- end sub
-
- end module
-